//
//  MZMessageCell.m
//  minzuwenhuagong
//
//  Created by WANG CUNRUI on 14-5-23.
//  Copyright (c) 2014年 WANG CUNRUI. All rights reserved.
//

#import "MZMessageCell.h"
#import "MZmesage.h"
#import "MZMessageDetailedViewController.h"

@implementation MZMessageCell
MZMessageDetailedViewController *_messageDetailedView;
- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.imageView setFrame:CGRectMake(0, 0, 320, 160)];
//    _imageview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 160)];
//    [self.contentView addSubview:_imageview];
    [self.detailTextLabel setFrame:CGRectMake(0, 142, 200, 20)];
    [self.detailTextLabel setTextColor:[UIColor whiteColor]];
    [self.detailTextLabel setBackgroundColor:[UIColor colorWithRed:20/255.0 green:40/255.0 blue:40/255.0 alpha:0.5]];
    [self.textLabel setFrame:CGRectMake(200, 142, 160, 20)];
    [self.textLabel setBackgroundColor:[UIColor colorWithRed:20/255.0 green:40/255.0 blue:40/255.0 alpha:0.5]];
    self.textLabel.font = [UIFont boldSystemFontOfSize:13];
    [self.textLabel setTextColor:[UIColor whiteColor]];
    [self.imageView addSubview:self.detailTextLabel];
    [self.imageView addSubview:self.textLabel];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier];
    
    if (self) {
        // 取消显示选中颜色
        [self setSelectionStyle:UITableViewCellSelectionStyleNone];
        
//        [self setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
    }
    
    return self;
}


// 选中或者撤销选中单元格的方法
//- (void)setSelected:(BOOL)selected animated:(BOOL)animated
//{
//    [super setSelected:selected animated:animated];
//    
//    // 选中表格行
//    if (selected) {
//        [self setBackgroundColor:[UIColor yellowColor]];
//    } else {
//        // 撤销选中表格行
//        [self setBackgroundColor:[UIColor whiteColor]];
//    }
//}



@end
